﻿@model Website.Models.Styling.PagingArrows

<!-- right arrow -->
<td>
    @if (this.Model.CurrentSkip == 0)
    {
        // we're at the beginning of the userlist, dummy arrow
        <img src="@Url.Content("~/Content/ButtonIcons/back.png")" />
    }
    else
    {
        // we're into the list, let's calculate previous
        <a href="@Url.Action(this.Model.Action, new { @skip = this.Model.CurrentSkip - this.Model.CurrentTake })">
            <img src="@Url.Content("~/Content/ButtonIcons/back_blue.png")" />
        </a>
    }
</td>

@for (int i = 0; i < (this.Model.TotalAmountOfColumns - 2); i++)
{
    <td></td>
}

<!-- left arrow -->
<td class="rightAlign">
    @if (this.Model.CurrentTotalRowCount > (this.Model.CurrentSkip + this.Model.CurrentTake))
    {
        // we're not at the end of the list yet, calculate next set of users
        <a href="@Url.Action(this.Model.Action, new { @skip = this.Model.CurrentSkip + this.Model.CurrentTake })">
            <img src="@Url.Content("~/Content/ButtonIcons/forwards_blue.png")" />
        </a>
    }
    else
    {
        // we're at the end of the list, dummy arrow
        <img src="@Url.Content("~/Content/ButtonIcons/forwards.png")" />
    }
</td>